package com.example.baseapp.activity

import android.annotation.SuppressLint
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.example.baseapp.R
import com.example.baseapp.activity.Fragment.TestFragment
import com.example.baseapp.entry.Money
import kotlinx.android.synthetic.main.activity_operator.*

/**
 * @作者：HuaCon
 *
 * @类描述：运算符重载
 *
 */
class OperatorActivity : AppCompatActivity() {
    @SuppressLint("SetTextI18n")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_operator)
        val money1 = Money(40)
        val money2 = Money(30)

        textView.text = """
            money1 is Object, value is -> ${money1.value},
            money2 is Object, value is -> ${money2.value},
            money1 + money2 value is -> ${money1.plus(money2)},
            money1 - money2 value is -> ${money1.minus(money2)},
        """.trimIndent()
    }


}